/*
 * @Description: 
 * @version: 
 * @Author: 171
 * @Date: 2022-09-15 13:29:36
 * @LastEditors: 171
 * @LastEditTime: 2022-09-15 13:33:03
 */
import { defineStore } from 'pinia'
import { NAMES } from './name-space'

export const useInteractStore = defineStore(NAMES.INTERACT, {
  state: () => ({
    joinRoom: <any>[],
    leaveRoom: <any>{}
  }),
  actions: {
    setJoinRoom(payload: any){
      this.joinRoom.push(payload)
    },
    setLeaveRoom(payload: any){
      this.leaveRoom.username = payload.username
    }
  }
})